package spec.dengyuru.animal;

public class Frog extends Animal implements IAnimal{
    public String liangqi;
    public Frog() {
    }
    public Frog(String name, String food, String ared,String liangqi) {
        super(name, food, ared);
        this.liangqi="两栖";
    }

    @Override
    String findfood() {
        String n=super.getName();
        return super.getName()+"吃"+super.getFood();
    }

    @Override
    String wholeLife() {
        String b=this.born();
        String f=this.findfood();
        String o=this.old();
        String d= this.die();
        String s=this.sick();
        return b+"\n"+f+"\n"+o+"\n"+d+"\n"+s;
    }

    @Override
    public String born() {
        String n=super.getName();
        Date d=new Date();
        return n+"出生"+d.toString();
    }

    @Override
    public String old() {
        String n=super.getName();
        return super.getName()+"变老";
    }

    @Override
    public String sick() {
        String n=super.getName();
        return super.getName()+"生病了";
    }

    @Override
    public String die() {
        String n=super.getName();
        return super.getName()+"死了";
    }
}




